<template>
	<view class="bods">
		<Setps :num='1' :headtitle='headtext' :tit='tit' />
		<view style="height: 50rpx;"></view>
		
		<formdrem  :flist='list' />
		<view class="addbtn">
			<view style='width: 90%;margin: 20rpx auto;'>
				<view class="update">
					<p>
						<image src="@/static/newimg/tJ.svg" mode=""></image>
						<span style='color: #007aff;padding-left: 10rpx;'>添加行程</span>
					</p>
				</view>
			</view>
		</view>
		<Nextbtn :backtitle='backtitle' :nexttitle='nexttitle' :next='next' />
	</view>
</template>

<script>
	import Setps from '@/workspaces/tools/setps.vue'
	import formdrem from '@/workspaces/tools/formdrem.vue'
	import Nextbtn from '@/workspaces/tools/nextbtn.vue'
	export default {
		data() {
			return {
				tit:[
					{name:'信息变更'},
					{name:'行程变更'},
					{name:'费用明细'},
					{name:'确认提交'},
				],
				headtext:'出差申请',
				list:[
					{tit:'行程',id:1,move:true},
					{tit:'行程',id:2,move:true},
				],
				model:'',
				backtitle:'上一步(信息变更)',
				nexttitle:'下一步(费用明细)',
				next:'./Budget'
			};
		},
		onLoad(option) {
				if(option.ob)
				console.log(JSON.parse(decodeURIComponent(option.ob)))
				this.model = JSON.parse(decodeURIComponent(option.ob))
				console.log(this.model.userInfo.name)
		},
		methods:{
			moveUp(list, index) {
			    if (index != 0) {
			      list[index] = list.splice(index - 1, 1, list[index])[0];
			    } else {
			      list.push(list.shift());
			    }
			  },
			rightClick(){
				console.log(1)
			},
			handback(){
				uni.navigateBack()
			},
			handbudget(){
				this.$jump('./Budget', 'navigate');
				
			}
		},
		components:{
			Setps,
			formdrem,
			Nextbtn
		}
	}
</script>

<style lang="scss" scoped>
view{
	font-family: pf
}
.btn{
	width: 90%;
	margin: 0 auto;
}
.addbtn{
	width: 90%;
	background-color: white;
	margin: 0 auto;
	margin-bottom: 50rpx;
	// height: 100rpx;
	padding: 10rpx 0;
	box-sizing: border-box;
}
.update {
		width: 100%;
		height: 80rpx;
		border: 1px solid #007aff;
		border-radius: 4px;
		display: flex;
		align-items: center;
		justify-content: center;
		p {			
			image {
				width: 40rpx;
				height: 40rpx;
				vertical-align: bottom;
			}
		}
	}

</style>
